package pv

import (
	"gitee/yinlai/kms-backend/controllers/pv"
	"github.com/gin-gonic/gin"
)

// 实现添加集群
func create(pvGroup *gin.RouterGroup) {
	pvGroup.POST("/create", pv.Create)
}

// 更新集群
func update(pvGroup *gin.RouterGroup) {
	pvGroup.POST("/update", pv.Update)
}

// 删除
func delete(pvGroup *gin.RouterGroup) {
	pvGroup.POST("/delete", pv.Delete)
}

// 删除列表
func deleteList(pvGroup *gin.RouterGroup) {
	pvGroup.POST("/deleteList", pv.DeleteList)
}

// 获取
func get(pvGroup *gin.RouterGroup) {
	pvGroup.GET("/get", pv.Get)
}

// 获取集群列表
func list(pvGroup *gin.RouterGroup) {
	pvGroup.GET("/list", pv.List)
}

func RegisterSubRouter(g *gin.RouterGroup) {
	pvGroup := g.Group("/pv")
	create(pvGroup)
	update(pvGroup)
	delete(pvGroup)
	get(pvGroup)
	list(pvGroup)
	deleteList(pvGroup)
}
